<?php
class Software_Data_Singlesoftware {
	
	private $database;
	private $secure;
	
	public function __construct(){
		$this->database = new Core_Driver_MysqlImproved();
		$this->secure = new Core_Data_Secure();
	}
	
	public function getData(array $getVars){
		$this->database->connect();
		
		$getVars = $this->secure->parseData($getVars);
		
		$page = $getVars['page'];
		
		$page = $this->database->escape($page);
		$this->database->prepare(
			"
				SELECT 
				*
				FROM 
				software,
				software_meta_values,
				software_content_values
				WHERE
				software.software_name = software_meta_values.software_name
				AND
				software.software_name = software_content_values.software_name
				AND
				software.software_name = '$page'
				LIMIT
				1
				;
				"
		);
		$this->database->query();
		$article = $this->database->fetch('array');
		return $article;
	}
	
}